<div class="primary">
    <div class="main-content">
        <div class="main-content-left">
            <div class="breadcrumb">
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/"><span itemprop="title">Trang chủ</span></a>
            		<span class="arrow"><img src="<?=$path_images_page?>navRow.png" alt="bredcrumb arrow"/></span>
            	</span>
            	<span itemtype="http://data-vocabulary.org/Breadcrumb" itemscope="itemscope" class="crumb_item">
            		<a itemprop="url" rel="up" class="crumb" href="<?=DOMAIN?>/<?=removeTitle(GetNamecat($iCat))?>.htm"><span itemprop="title"><?=GetNamecat($iCat)?></span></a>
            	</span>
                <span class="breadcrumb_date"><?=getDateTime('','1','1','0','',time())?></span>
            </div>
            <h1 style="width:0px; height:0px; overflow:hidden;text-indent:-9999em;">Tin tức <?=GetNamecat($iCat)?> cập nhật</h1>
        <?php
        foreach($list_news as $news) {
            ?>
            <div class="cat-news-box">
                <div class="cat-new-box-left">
                    <div class="img">
                        <a href="<?=generate_detail_url($news,GetNamecat($news['new_cat_id']))?>"><img alt="<?=$news['new_title']?>" src="<?=show_medium_url($news['new_picture'])?>" /></a>
                    </div>
                    <div class="cont">
                        <a href="<?=generate_detail_url($news,GetNamecat($news['new_cat_id']))?>"><h2><?=$news['new_title']?></h2></a>
                        <p class="time" itemprop="datePublished"><time  datetime="<?=date('d/m/y ',$news['new_date'])?> <?=date('H:i',$news['new_date'])?>"> <?=getDateTime('','1','1','1','',$news['new_date']+5*3600)?></time></p>
                        <p><?=$news['new_teaser'] != '' ? cut_string(removeHTML($news['new_teaser']),300,'.') : cut_string(removeHTML($news['new_detail']),150,'.')?></p>
                    </div>
                </div><!-- End cat-news-box-left -->
                <? /*
                <div class="cat-new-box-right"> 
                    <ul>
                    <?php
                    $relate = news_relate($news,3);                
                    for($i = 0; $i < 3; $i++) {
                        if(isset($relate[$i])) {
                            ?>
                            <li><a href="<?=generate_detail_url($relate[$i],GetNamecat($relate[$i]['new_cat_id']));?>"><h3><?=$relate[$i]['new_title']?></h3></a></li>
                            <?
                        }
                    }
                    ?>
                    </ul>
                </div><!-- End cat-news-box-right -->
                */?>
            </div><!-- End cat-news-box -->
            <?
        }
        ?>
            <div class="paging">
                <b>Trang : </b>
                <?php 
                $name_cat = GetNamecat($iCat);
                if($total_list > 0){
                    if($page <= 3){
                        if($page == 1){
                            for($j=$page;$j<=$page + 6;$j++){
                                if($j==$page){
                                    ?>
                                    <a class="curent" href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                                    <?
                                }else{
                                    ?>
                                    <a href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                                    <?
                                }
                                
                            }
                        }
                        if($page == 2){
                            ?>
                            <a href="<?=generate_cat_page_url($name_cat,'1')?>">1</a>
                            <?
                            for($j=$page;$j<=$page + 5;$j++){
                                if($j==$page){
                                    ?>
                                    <a class="curent" href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                                    <?
                                }else{
                                    ?>
                                    <a href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                                    <?
                                }
                                
                            }
                        }
                        if($page == 3){
                            ?>
                            <a href="<?=generate_cat_page_url($name_cat,'1')?>">1</a>
                            <a href="<?=generate_cat_page_url($name_cat,'2')?>">2</a>
                            <?
                            for($j=$page;$j<=$page + 4;$j++){
                                if($j==$page){
                                    ?>
                                    <a class="curent" href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                                    <?
                                }else{
                                    ?>
                                    <a href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                                    <?
                                }
                                
                            }
                        }
                    }else{
                        for($j=$page -3;$j<$page;$j++){
                            ?>
                            <a href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                            <?
                        }
                        for($j=$page;$j<=$page + 3;$j++){
                            if($j==$page){
                                ?>
                                <a class="curent" href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                                <?
                            }else{
                                ?>
                                <a href="<?=generate_cat_page_url($name_cat,$j)?>"><?=$j?></a>
                                <?
                            }
                        }
                    }    
                }else{
                    ?>
                        <center>Hết tin</center>
                    <?
                }
                ?>
            </div>
        </div><!-- End main-content-left -->
        <div class="main-content-right">
            <img alt="quang cao" src="../themes/img/adv2.jpg" />
        </div><!-- End main-content-right -->
    </div><!-- End main-content -->
</div><!-- End primary -->
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-recommendations-bar" data-site="vnupdate.net" data-read-time="30" data-side="right" data-action="recommend" style="z-index: 10001;"></div>
<script>
    $('.nav-menu li').click(function(){
        $(this).siblings('li').removeClass('active');
        $(this).addClass('active');
    });
    $(document).ready(function () { 
        $(window).scroll(function(){
            var scrollPos = $(window).scrollTop();
            if ( scrollPos > 95){
                $('.fix_menu_active').css({'height':'35px','width':'1010px','margin': '0 auto'})
                $('.fix_menu').css({'position':'fixed','width':'100%','height':'35px','left':'0px','top':'0px'});
                $('.navigation').css({'position':'fixed','margin':'0 auto','left':'50%','margin-left':'-505px','top':'0px'});
                
            }else{
                $('.fix_menu_active').removeAttr('style');
                $('.fix_menu').removeAttr('style');
                $('.navigation').removeAttr('style');
            }
        });  
    });
</script>